<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<#include "/include/head_common.html">
<title>角色管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	function page(n, s) {
		$("#pageNum").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="list">角色列表</a></li>
		<li><a href="edit">角色添加</a></li>
	</ul>
	<form id="searchForm" action="list"
		method="post" class="breadcrumb form-search">
		<input id="pageNum" name="pageNum" type="hidden" value="${page.pageNum}" /> 
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
		<label>角色名 ：</label> 
		<input type="text" name="name" maxlength="50" class="input-medium" value="${role.name!''}"/> &nbsp;
		<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" />
	</form>
	<#include "/include/message.html">
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<tr>
			<th>角色名称</th>
			<th>英文名称</th>
			<th>归属机构</th>
			<th>数据范围</th>
			<th>操作</th>
		</tr>
		<#list page.list as role>
		<tr>
			<td><a href="edit?id=${role.id}">${role.name!''}</a></td>
			<td><a href="edit?id=${role.id}">${role.enname!''}</a></td>
			<td>
				<#if role.officeId??>${officeMap[role.officeId]}<#else>无</#if>
			</td>
			<td>
				<#if role.dataScope??>${dictMap[role.dataScope]}<#else>无</#if>
			</td>
			<td>
				<a href="assign?id=${role.id}">分配</a> 
				<a href="edit?id=${role.id!''}">修改</a>
				<a href="delete?id=${role.id!''}"onclick="return confirmx('确认要删除该角色吗？', this.href)">删除</a>
			</td>
		</tr>
		</#list>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>